package com.bawan.ddbb.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * Desc:  论坛用户领域模型
 * Author: zhengcongchun
 * CreateTime: 2014-05-28 12:55
 * LastModifyTime: 2014-05-28 12:55
 * FinalModifier: zhengcongchun
 * Version: 1.0
 */
@Entity
@Table(name = "t_user")
public class User extends BaseDomain {
    @Id
    @Column(name = "user_id")
    private Integer userId;
    @Column(name = "user_name")
    private String userName;
    @Column(name = "password")
    private String password;
    @Column(name = "credits")
    private Integer credits;
    @Column(name = "last_ip")
    private String lastIp;
    @Column(name = "last_visit")
    private Date lastVisit;

    public User(){}

    public User(Integer userId, String userName, String password, Integer credits, String lastIp, Date lastVisit) {
        this.userId = userId;
        this.userName = userName;
        this.password = password;
        this.credits = credits;
        this.lastIp = lastIp;
        this.lastVisit = lastVisit;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getCredits() {
        return credits;
    }

    public void setCredits(Integer credits) {
        this.credits = credits;
    }

    public String getLastIp() {
        return lastIp;
    }

    public void setLastIp(String lastIp) {
        this.lastIp = lastIp;
    }

    public Date getLastVisit() {
        return lastVisit;
    }

    public void setLastVisit(Date lastVisit) {
        this.lastVisit = lastVisit;
    }
}
